import requests
import json
url = 'https://fanyi.baidu.com/sug'

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36'
}

data = {
    'kw': 'spider'
}

response = requests.post(url=url, headers=headers, data=data)
content = response.text
obj = json.loads(content)
print(obj)

# 总结：
# post请求是不需要编解码
# post请求的参数是data
# 不需要请求对象的定制
